package com.rk.kbk.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rk.kbk.common.DateJsonDeserializer;
import com.rk.kbk.common.DateJsonSerializer;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @OpenArea
 * @开通地区(open_area)
 * @version : Ver 1.0
 */
@Entity
public class OpenArea implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * @备注:开通地区
     * @字段:id BIGINT(33)
     */
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @GenericGenerator(name="auto-identity",strategy="identity")
    @Column(updatable = false, columnDefinition="BIGINT(33) COMMENT '开通地区'")
    private java.lang.Long id;

    /**
     * @备注:省
     * @字段:province VARCHAR(255)
     */
    @Column(columnDefinition="VARCHAR(255) COMMENT '省'")
    private String province;

    /**
     * @备注:市
     * @字段:city VARCHAR(255)
     */
    @Column(columnDefinition="VARCHAR(255) COMMENT '市'")
    private String  city;

    /**
     * @备注:区
     * @字段:area VARCHAR(255)
     */
    @Column(columnDefinition="VARCHAR(255) COMMENT '区'")
    private String  area;

    /**
     * @备注:区域代码
     * @字段:area_code VARCHAR(255)
     */
    @Column(columnDefinition="VARCHAR(255) COMMENT '区域代码'")
    private String  areaCode;

    /**
     * @备注:状态
     * @字段:status int(255)
     */
    @Column(columnDefinition="VARCHAR(255) COMMENT '区'")
    private Integer  status;

    /**
     * @备注:
     * @字段:gmt_datetime DATETIME(19)
     */
    @Column(updatable = false, columnDefinition="DATETIME(19) COMMENT ''")
    @JsonSerialize(using=DateJsonSerializer.class)
    @JsonDeserialize(using=DateJsonDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
    private java.util.Date gmtDatetime = new java.util.Date();

    /**
     * @备注:
     * @字段:upt_datetime DATETIME(19)
     */
    @Column(columnDefinition="DATETIME(19) COMMENT ''")
    @JsonSerialize(using=DateJsonSerializer.class)
    @JsonDeserialize(using=DateJsonDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
    private java.util.Date uptDatetime = new java.util.Date();

    public OpenArea(){
    }

    public OpenArea(
            java.lang.Long id
    ){
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getGmtDatetime() {
        return gmtDatetime;
    }

    public void setGmtDatetime(Date gmtDatetime) {
        this.gmtDatetime = gmtDatetime;
    }

    public Date getUptDatetime() {
        return uptDatetime;
    }

    public void setUptDatetime(Date uptDatetime) {
        this.uptDatetime = uptDatetime;
    }
}
